class CreatePayments < ActiveRecord::Migration
  def self.up
    create_table  :payments, :force => true do |t|
      t.integer   :project_id,                           :null => false
      t.boolean   :is_paid,      :default => false
      t.datetime  :received_on
      t.datetime  :due_on
      t.decimal   :amount, :default => 0, :precision => 10, :scale => 2
      t.timestamps
    end
  end

  def self.down
    drop_table  :payments
  end
end
